<div id="main">
    <table cellspacing="0" class="list">
        <tr>
            <th>编号</th>
            <th>用户名</th>
            <th>添加时间</th>
            <th>最后登录时间</th>
            <th>操作</th>
        </tr>
        <?php foreach ($records as $record): ?>
        <tr class="hover">
            <td><?php echo $record['id'] ?></td>
            <td>
                <?php echo HTML::anchor("admin/admin/edit/{$record['id']}", $record['name']) ?>
            </td>
            <td><?php echo $record['dateline'] ?></td>
            <td><?php echo $record['last_login'] ? $record['last_login'] : '从未登录' ?></td>
            <td class="action">
                <?php echo HTML::anchor("admin/admin/edit/{$record['id']}", '修改') ?>
                <?php if ($record['id'] != 1): ?>
                    <?php echo HTML::anchor("admin/admin/delete/{$record['id']}", '删除', array('onclick' => "return window.confirm('确认要删除此管理员吗？\\n\\n本操作不可恢复！');")) ?>
                <?php endif ?>
            </td>
        </tr>
        <?php endforeach ?>
    </table>
    <?php echo $pagination ?>
</div>